//
//  UIUtils.m
//  blocklyios
//
//  Created by steward on 2018/11/29.
//  Copyright © 2018 szltech. All rights reserved.
//

#import "UIUtils.h"

@implementation UIUtils
+(void)showOneButtonDialog:(UIViewController *)vc title:(NSString *)title content:(NSString *)content btnStr:(NSString *)btnStr clickEvent:(ClickEvent __nullable) event {
    UIAlertController *controller = [UIAlertController alertControllerWithTitle:title message:content preferredStyle:UIAlertControllerStyleAlert];
    UIAlertAction *firstAction = [UIAlertAction actionWithTitle:btnStr style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {
        if (event) {
            event();
        }
    }];
 
    [controller addAction:firstAction];
    [vc presentViewController:controller animated:YES completion:nil];
}
@end
